<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/3/25
 * Time: 11:28
 */

namespace app\index\controller;

use think\Controller;
use think\facade\Cookie;

class Common extends Controller
{
    public function initialize()
    {
        if (empty(Cookie::get("userId"))) {
            $this->error("您还未登录","http://www.yd2021.com/index/login/login.html");
        }
    }
}